package cn.vin.service;

import cn.vin.dao.user.PeopleDao;
import cn.vin.domain.user.PeopleDo;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class PeopleService {
    @Resource
    private PeopleDao peopleDao;

    public void test() {
        PeopleDo peopleDo = new PeopleDo();
        peopleDo.setId(1L);
        peopleDo.setName("TOm");
        peopleDao.updateByPrimaryKeySelective(peopleDo);
        System.out.println(JSONObject.toJSONString(peopleDao.selectByPrimaryKey(1L)));
    }
}
